﻿using System;
using System.Threading;
using System.Windows.Forms;
using Kimgwajang.MidnightPeach.Forms;
using Kimgwajang.MidnightPeach.MidnightPeachServiceReference;

namespace Kimgwajang.MidnightPeach
{
    internal static class Program
    {
        [STAThread]
        private static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

#if DEBUG
#else
            Application.ThreadException += Application_OnThreadException;
#endif

            //            Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");

            Application.Run(new MainForm());
//            Application.Run(new TemplateEditForm());
            //            Application.Run(new TestForm());
            //            Application.Run(new LoadForm());

            //            var database = SchemaExtractor.Extract(@"C:\Documents and Settings\nullnull\바탕 화면\GuestBook.dbml");
            //            Application.Run(new TableForm(database));
        }

        private static void Application_OnThreadException(object sender, ThreadExceptionEventArgs e)
        {
            ExceptionForm form = new ExceptionForm(e.Exception);
            form.ShowDialog();
        }
    }
}